<template>
  <div class="pagination">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :total="productTotal"
      :page-size="pageSize"
      :page-sizes="[10,20,30,40]"
      layout="total, sizes, prev, pager, next, jumper"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    handleSizeChange(pageSize) {
      this.$emit('changePageSize',pageSize);
    },
    handleCurrentChange(currentPage) {
      this.$emit('changeCurrentPage',currentPage)
    },
  },
  components: {},
  props: [
    "currentPage",
    "productTotal",
    "pageSize"
  ],
};
</script>

<style lang='less' scoped>
.pagination {
  margin: 10px 0;
  padding: 5px;
  background-color: white;
}
</style>